package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBusinessFinanceRecordMapper;
import com.ruoyi.system.domain.SysBusinessFinanceRecord;
import com.ruoyi.system.service.ISysBusinessFinanceRecordService;

/**
 * 商家余额记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-14
 */
@Service
public class SysBusinessFinanceRecordServiceImpl implements ISysBusinessFinanceRecordService 
{
    @Autowired
    private SysBusinessFinanceRecordMapper sysBusinessFinanceRecordMapper;

    /**
     * 查询商家余额记录
     * 
     * @param id 商家余额记录主键
     * @return 商家余额记录
     */
    @Override
    public SysBusinessFinanceRecord selectSysBusinessFinanceRecordById(String id)
    {
        return sysBusinessFinanceRecordMapper.selectSysBusinessFinanceRecordById(id);
    }

    /**
     * 查询商家余额记录列表
     * 
     * @param sysBusinessFinanceRecord 商家余额记录
     * @return 商家余额记录
     */
    @Override
    public List<SysBusinessFinanceRecord> selectSysBusinessFinanceRecordList(SysBusinessFinanceRecord sysBusinessFinanceRecord)
    {
        return sysBusinessFinanceRecordMapper.selectSysBusinessFinanceRecordList(sysBusinessFinanceRecord);
    }

    /**
     * 新增商家余额记录
     * 
     * @param sysBusinessFinanceRecord 商家余额记录
     * @return 结果
     */
    @Override
    public int insertSysBusinessFinanceRecord(SysBusinessFinanceRecord sysBusinessFinanceRecord)
    {
        sysBusinessFinanceRecord.setCreateTime(DateUtils.getNowDate());
        return sysBusinessFinanceRecordMapper.insertSysBusinessFinanceRecord(sysBusinessFinanceRecord);
    }

    /**
     * 修改商家余额记录
     * 
     * @param sysBusinessFinanceRecord 商家余额记录
     * @return 结果
     */
    @Override
    public int updateSysBusinessFinanceRecord(SysBusinessFinanceRecord sysBusinessFinanceRecord)
    {
        sysBusinessFinanceRecord.setUpdateTime(DateUtils.getNowDate());
        return sysBusinessFinanceRecordMapper.updateSysBusinessFinanceRecord(sysBusinessFinanceRecord);
    }

    /**
     * 批量删除商家余额记录
     * 
     * @param ids 需要删除的商家余额记录主键
     * @return 结果
     */
    @Override
    public int deleteSysBusinessFinanceRecordByIds(String[] ids)
    {
        return sysBusinessFinanceRecordMapper.deleteSysBusinessFinanceRecordByIds(ids);
    }

    /**
     * 删除商家余额记录信息
     * 
     * @param id 商家余额记录主键
     * @return 结果
     */
    @Override
    public int deleteSysBusinessFinanceRecordById(String id)
    {
        return sysBusinessFinanceRecordMapper.deleteSysBusinessFinanceRecordById(id);
    }
}
